package nowcoder;

import java.util.Scanner;

/**
 * 等差数列公式：n/2*(a1 + an)
 */
public class 等差数列 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            System.out.println(sum(scanner.nextInt()));
        }
    }

    public static int sum(int count) {
        return count * (4 + (count - 1) * 3) / 2;
    }
}
